package com.changli.a_Array;

public class Demo2Exc1Yanghui {
    public static void main(String[] args) {
        int [][] Yanghui = new int [10][];
        for(int i=0; i<10; i++){
            Yanghui[i] = new int [i+1];
        }

        for(int i=0;i<Yanghui.length;i++){
            Yanghui[i][0] = 1;
            Yanghui[i][i] = 1;
        }
        for(int i=1; i<Yanghui.length; i++){
            for(int j=1; j<Yanghui[i].length-1; j++){
                Yanghui[i][j] = Yanghui[i-1][j-1]+Yanghui[i-1][j];
            }
        }
        for (int[] ints : Yanghui) {
            for (int anInt : ints) {
                System.out.print(anInt + "\t");
            }
            System.out.println();

        }
        System.out.println("hahaha");
        System.out.println("hahaha1");
        System.out.println("haha2222");
    }
}
